package com.luke.star.persist.mapper;

import com.luke.star.persist.po.StAssignmentLog;
import com.luke.star.persist.po.StAssignmentLogExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface StAssignmentLogMapper {
    @SelectProvider(type=StAssignmentLogSqlProvider.class, method="countByExample")
    long countByExample(StAssignmentLogExample example);

    @DeleteProvider(type=StAssignmentLogSqlProvider.class, method="deleteByExample")
    int deleteByExample(StAssignmentLogExample example);

    @Delete({
        "delete from st_assignment_log",
        "where assi_id = #{assiId,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String assiId);

    @Insert({
        "insert into st_assignment_log (assi_id, note, ",
        "create_time)",
        "values (#{assiId,jdbcType=VARCHAR}, #{note,jdbcType=VARCHAR}, ",
        "#{createTime,jdbcType=TIMESTAMP})"
    })
    int insert(StAssignmentLog record);

    @InsertProvider(type=StAssignmentLogSqlProvider.class, method="insertSelective")
    int insertSelective(StAssignmentLog record);

    @SelectProvider(type=StAssignmentLogSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="assi_id", property="assiId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="note", property="note", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<StAssignmentLog> selectByExample(StAssignmentLogExample example);

    @Select({
        "select",
        "assi_id, note, create_time",
        "from st_assignment_log",
        "where assi_id = #{assiId,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="assi_id", property="assiId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="note", property="note", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP)
    })
    StAssignmentLog selectByPrimaryKey(String assiId);

    @UpdateProvider(type=StAssignmentLogSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") StAssignmentLog record, @Param("example") StAssignmentLogExample example);

    @UpdateProvider(type=StAssignmentLogSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") StAssignmentLog record, @Param("example") StAssignmentLogExample example);

    @UpdateProvider(type=StAssignmentLogSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(StAssignmentLog record);

    @Update({
        "update st_assignment_log",
        "set note = #{note,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=TIMESTAMP}",
        "where assi_id = #{assiId,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(StAssignmentLog record);
}